package com.fxm.controller;

import com.fxm.domain.Menu;
import com.fxm.returns.RespCode;
import com.fxm.returns.RespEntity;
import com.fxm.service.MenuService;
import io.swagger.annotations.Api;
import java.util.List;

import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 菜单 前端控制器
 * </p>
 *
 * @author fxm
 * @since 2021-02-06
 */
@RestController
@RequestMapping("/menu")
@Slf4j
@Api(value = "菜单管理", tags = "菜单管理")
public class MenuController {

    @Resource
    private MenuService menuService;

    @GetMapping
    @ApiOperation(value = "菜单列表")
    public RespEntity<List<Menu>> queryAllMenus() {
        RespEntity<List<Menu>> respEntity = menuService.queryAllMenus();
        return respEntity;
    }

}
